# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=lightbulb
pkgver=88.9e8d6f3
pkgrel=5
pkgdesc='Python framework for auditing web applications firewalls.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
arch=('any')
url='https://github.com/lightbulb-framework/lightbulb-framework'
license=('MIT')
depends=('python2' 'python2-cliff' 'python2-sfalearn' 'python2-symautomata'
         'python2-prettytable' 'python2-setuptools' 'python2-contextlib2'
         'python2-backports.functools_lru_cache')
makedepends=('git' 'python2-setuptools')
source=("$pkgname::git+https://github.com/lightbulb-framework/lightbulb-framework.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i "s|'multiprocessing',||" setup.py
  sed -i "s|'multiprocessing',||" lightbulb/cli/use.py
}

package() {
  cd $pkgname

  python2 setup.py install --root="$pkgdir"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

